package com.kaishengit.servic;

import java.util.List;

import com.kaishengit.dao.ProductDao;
import com.kaishengit.pojo.Product;

public class ProductServic {
	ProductDao productDao = new ProductDao();

	public List<Product> getList() {
		return productDao.findAll();
	}

	public void save(Product product) {
		productDao.save(product);

	}

	public Product getProduct(int id) {
		return productDao.findById(id);

	}

	public void update(Product product) {
		productDao.update(product);

	}

	public void delete(int id) {
		productDao.delete(id);

	}

}
